#!/bin/bash

function usage() {
    echo "Usage: $( basename $0 ) <src> <target>"
    exit 0
}

if [ $# -ne 2 ]
then
    usage
fi

src="$1"
target="$2"

if [ "." == "${target}" ]
then
    echo "target couldn't be .(point)"
    exit
fi

if [ -L "${target}" ]
then
    unlink "${target}"
    sleep 1
fi

ln -s "${src}" "${target}"

ls -l "${target}" | awk '{print $9 " " $10 " " $11}'
